Customize Form - Links Table
The links
table in the Customize Form Doctype is used to define relationships between the current Doctype and other Doctypes. Each row in the links
table represents a link or relationship. Here is an explanation of the individual fields in the links
table and their usage:
1. link_doctype
- Description: Specifies the target Doctype to which the link is created.
- Use: Define the Doctype that the current Doctype should reference or interact with. For example, linking a Sales Order to a Customer Doctype.
2. link_fieldname
- Description: The fieldname in the current Doctype used for the link.
- Use: Identifies the field in the current Doctype that establishes the link to the specified Doctype. For example, a
customer
field in a Sales Order links to the Customer Doctype.
3. group
- Description: Categorizes the link under a specific group.
- Use: Organize links into groups for better readability or functionality, especially when dealing with complex Doctypes.
4. hidden
- Description: Indicates whether the link should be hidden from the user interface.
- Use: Hide links that are not directly relevant to the user but are used in backend processes or automation.
5. idx
- Description: Specifies the sequence number of the link in the list.
- Use: Controls the order in which links are displayed in the
links
table.
Examples of Usage:
Linking a Sales Invoice to a Customer:
link_doctype
: Customerlink_fieldname
: customer- Use: Establish a relationship where a Sales Invoice references the Customer Doctype.
Linking a Task to a Project:
link_doctype
: Projectlink_fieldname
: project- Use: Ensure every Task is associated with a specific Project.
Hidden Link for Backend Use:
link_doctype
: Userlink_fieldname
: ownerhidden
: Checked- Use: Track the user who created the document without displaying it to others.
Grouped Links for Better Organization:
link_doctype
: Itemlink_fieldname
: item_codegroup
: Inventory- Use: Group item-related links together in the interface.
These fields allow you to define and manage the relationships between Doctypes, enabling smooth data integration and automation across modules.